<<<<<<< HEAD
#include<stdio.h>
int main()
{
	int i=0,n,mn=1,cn=0;
	scanf("%d",&n);
	while(n!=0)
	{
		for(i=0;i<n;i++)
		{
			if(i==0)continue;
			if(i>3)
				{
					mn++;cn--;
				}
			cn=cn+mn;
		}
		printf("%d\n",cn+mn);
		cn=0;mn=1;
		scanf("%d",&n);
	}
	return 0;
=======
#include<stdio.h>
int main()
{
	int i=0,n,mn=1,cn=0;
	scanf("%d",&n);
	while(n!=0)
	{
		for(i=0;i<n;i++)
		{
			if(i==0)continue;
			if(i>3)
				{
					mn++;cn--;
				}
			cn=cn+mn;
		}
		printf("%d\n",cn+mn);
		cn=0;mn=1;
		scanf("%d",&n);
	}
	return 0;
>>>>>>> 4eb85a45f45791935900b3793d471667a48122f2
}